package app.util.image.action
{
	import app.util.*;
	
	import flash.display.*;
	import flash.geom.*;
	
	public class CutAction extends AbstractAction
	{
		public override function getDescription():String
		{
			return "Image Crop";
		}
		
		public override function getActionedBitmapData():BitmapData
		{
			var oldBmp:BitmapData = Mediator.getCurrentBitmapData();
			var cutRect:Rectangle = Mediator.getImageCutter().getCutterRectangle();			
			var cut:BitmapData = new BitmapData(
			  		cutRect.width, cutRect.height, true, 0x0);
			cut.copyPixels(oldBmp, cutRect, new Point(0, 0));
			return cut;
		}
	}
}